﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using MusicOnLine.Common;

namespace MusicOnLine.Models
{
    [MetadataType(typeof(AACInfoMetadata))]
    public partial class AACInfo
    {
        private class AACInfoMetadata
        {
            [Required]
            public string Album { get; set; }
            [Required]
            public string AlbumArtist { get; set; }
            [Required]
            public string Artist { get; set; }
            public string Genre { get; set; }
            [Required]
            [FileFormat("m4a,mp3,wma")]
            public string Location { get; set; }
            [Required]
            public string Name { get; set; }           
            public Nullable<System.DateTime> ReleaseDate { get; set; }
            [RegularExpression("[0-9][0-9][0-9][0-9]")]
            public Nullable<int> Year { get; set; }
            [FileFormat("jpg,bmp,png")]
            public string IMGPath { get; set; }
        }
    }
    [MetadataType(typeof(AlbumMetadata))]
    public partial class Album
    {
        private class AlbumMetadata
        {         
            [Required]
            public string AlbumName { get; set; }
            [Required]
            public string ArtistName { get; set; }            
            public Nullable<int> PublishYear { get; set; } 
            [FileFormat("jpg,png,bmp")]
            public string ImgUrl { get; set; }           
        }
    }
}